package com.sunyard.dal.mapper;

import com.sunyard.dal.dto.RoleDTO;
import com.sunyard.dal.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface RoleMapper {

    int insert(Role role);

    //根据角色名称(分页查询)角色信息
    List<RoleDTO> getRoleListByPage(Map<String, Object> map);

    int existRoleName(String roleName);

    Role getRoleByRoleId(String roleId);

    int updateRole(Role role);

    int deleteRole(Role role);

    List<Role> getRoles();

    RoleDTO getRoleDTOByRoleId(String roleId);

    Role getAuditBefore(String auditId);

    String getRoleByRoleName(String roleName);

    /**
     * @author wp
     * @Description: 查询用户该权限的角色，排除系超级管理员
     * @date 2022/10/12
     */
    List<Role> getRoleByPopedomId(@Param("popedomId")String popedomId,@Param("adminRoleId")String adminRoleId);

    Integer getCountByIds(@Param("roleIds") List<String> roleIds);
}